import gtk

from gtkmvc import Controller

class MyController(Controller):

    def register_view(self, view):
        return

    def register_adapters(self):
        self.adapt("use_rb1", "rb1")
        self.adapt("option1")
        self.adapt("option2")
        return
  
    # signals handling
    def on_button_action_clicked(self, button):
        self.model.do_action()
        return

    def on_window1_delete_event(self, w, e):
        gtk.main_quit()
        return False
    
    # observable properties notifications
    def property_use_rb1_value_change(self, model, old, new):
        self.view.enable_rb2(not new)
        return
  
    pass # end of class

